package com.ldk.framework.service;

import com.ldk.base.framework.service.IBaseService;
import com.ldk.framework.entity.Driver;
import com.ldk.framework.entity.TicketUser;

import java.util.Map;

/**
 * TicketUserService接口类
 *
 * @author mqy
 */
public interface ITicketUserService extends IBaseService<TicketUser> {

    /**
     * 根据phoneNo获取佣金信息
     *
     * @param dbKey
     * @param phoneNo
     * @return
     */
    TicketUser getTicketInfoByPhoneNo(String dbKey, String phoneNo);

    /**
     * 根据saleNo获取票务经理信息
     *
     * @param dbKey
     * @param saleNo
     * @return
     */
    TicketUser getTicketInfoBySaleNo(String dbKey, String saleNo);


    /**
     * 生成推荐吗
     *
     * @param dbKey
     * @return
     */
    String generateSaleNo(String dbKey);


    /**
     * 保存推荐关系
     *
     * @param dbKey
     * @param phoneNo    用户手机号码
     * @param ticketUser 票务经理
     * @return
     */
    Boolean saveTicketBySaleNo(String dbKey, String phoneNo, TicketUser ticketUser);

    /**
     * 计算推荐金额
     *
     * @param dbKey
     * @param phoneNo 用户手机号码
     * @return
     */
    Map<String, Double> calcatePrice(String dbKey, String phoneNo, String tripNo, double totalPrice);

}
